package com.study.demo.gsbean.demo6;

/**
 * @author: elvin
 * @time: 2019-04-25 14:41
 * @desc:
 **/
public class Father {

    private String name = getName();

    public Father() {
        this("null");
        /*if(name == null){
            System.out.println(" name is null now ");
        }*/
        System.out.println(" --- Father() ---");
    }

    public Father(String name) {
        System.out.println("--- Father(" + name + ") ---");
    }

    public void printf() {
        System.out.println(" printf " + name);
    }

    String getName() {
        System.out.println("--- Father name ---");
        return "name";
    }
}
